package com.xuxin.baby.database;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;

/**
 * Created by xu_xin
 * Created on 2020/10/13 0010
 * 历史记录数据库
 */
@Entity
public class HistoryBean implements MultiItemEntity {
    @Id(autoincrement = true)//设置自增长
    private Long id;
    @Index(unique = true)//设置唯一性
    private String uid;//uid
    private String title;//标题
    private String content;//内容
    private int type;//视频或文章
    private String image;//封面

    @Generated(hash = 716618477)
    public HistoryBean(Long id, String uid, String title, String content, int type,
                       String image) {
        this.id = id;
        this.uid = uid;
        this.title = title;
        this.content = content;
        this.type = type;
        this.image = image;
    }

    @Generated(hash = 48590348)
    public HistoryBean() {
    }

    @Override
    public int getItemType() {
        return type;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUid() {
        return this.uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getType() {
        return this.type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getImage() {
        return this.image;
    }

    public void setImage(String image) {
        this.image = image;
    }
}